Conversion of boolean conditions

ABSTRACT

A Set Boolean machine instruction is provided that has associated therewith a result location to be used for a set Boolean operation and a mask. The mask is configured to test a plurality of types of conditions, including simple conditions and composite conditions. The machine instruction is executed, and the executing includes performing a first logical operation between the mask and contents of a selected field to obtain an output. The mask indicates a condition to be tested, and the condition is one type of condition of the plurality of types of conditions. The executing further includes performing a second logical operation on the output to obtain a first value represented as one data type, and placing a result in the result location based on the first value. The result including a second a value of another data type, the other data type being different from the one data type.

BACKGROUND

One or more aspects relate, in general, to processing within a computingenvironment, and in particular, to Boolean processing within thecomputing environment.

Many programming languages, which are used to create applications thatperform functions within a computing environment, support Booleanexpressions, such as expression=(a<b). However, hardware structures toimplement Boolean expressions are inadequate. For instance, hardwaresupports condition registers, flags or predicates, but programminglanguages support byte, halfword, word or doubleword integer formats.Therefore, compilers are used to convert the result of comparisons, orsometimes more complex logical expressions contained in flags, conditionfields or predicate fields, into integer words.

Converting a condition code to an integer typically involves one or moreexpensive, hard to predict branches or the use of a number ofinstructions and registers (more than two) when using other types offunctions, such as a conditional move or select function.

SUMMARY

Shortcomings of the prior art are overcome and additional advantages areprovided through the provision of a computer program product forexecuting a machine instruction. The computer program product includes astorage medium readable by a processing circuit and storing instructionsfor execution by the processing circuit for performing a method. Themethod includes, for instance, obtaining, by a processor, a machineinstruction to perform a set Boolean operation. The machine instructionhas associated therewith, for instance, a result location to be used forthe set Boolean operation and a mask configured to test a plurality oftypes of conditions including simple conditions and compositeconditions. The machine instruction is executed and the executingincludes: performing a first logical operation between the mask andcontents of a selected field to obtain an output, the mask indicating acondition to be tested, the condition being one type of condition of theplurality of types of conditions; performing a second logical operationon the output to obtain a first value, the first value represented asone data type; and placing a result in the result location based on thefirst value, the result comprising a second value of another data type,the other data type being different from the one data type.

Methods and systems relating to one or more aspects, as well as othercomputer program products, are also described and may be claimed herein.Further, services relating to one or more aspects are also described andmay be claimed herein.

Additional features and advantages are realized through the techniquesdescribed herein. Other embodiments and aspects are described in detailherein and are considered a part of the claimed aspects.

BRIEF DESCRIPTION OF THE DRAWINGS

One or more aspects are particularly pointed out and distinctly claimedas examples in the claims at the conclusion of the specification. Theforegoing, as well as features and advantages of one or more aspects,are apparent from the following detailed description taken inconjunction with the accompanying drawings in which:

FIG. 1 depicts one example of a computing environment to incorporate anduse one or more aspects;

FIG. 2A depicts another example of a computing environment toincorporate and use one or more aspects;

FIG. 2B depicts further details of the memory of FIG. 2A;

FIG. 3A depicts one example of a compare instruction;

FIG. 3B depicts one example of a condition register;

FIG. 4A depicts one example of a Set Boolean instruction, in accordancewith one or more aspects;

FIG. 4B depicts one embodiment of logic associated with the Set Booleaninstruction of FIG. 4A, in accordance with one or more aspects;

FIG. 5 depicts logic to obtain and execute an instruction to set aBoolean condition, in accordance with one or more aspects;

FIG. 6 depicts one example of a cloud computing node, in accordance withone or more aspects;

FIG. 7 depicts one embodiment of a cloud computing environment, inaccordance with one or more aspects; and

FIG. 8 depicts one example of abstraction model layers, in accordancewith one or more aspects.

DETAILED DESCRIPTION

In accordance with one or more aspects, a capability is provided toefficiently convert Boolean conditions (e.g., represented as binary)into values in registers, such as integer registers. This capabilityincludes setting, in one implementation, a result register to reflectthe converted Boolean value in a selected non-binary data type (e.g.,integer, floating point, decimal floating point (DFP), binary codeddecimal (BCD), etc.) for a selected condition of a plurality ofconditions. The plurality of conditions may be different types ofconditions, including simple (i.e., non-composite) conditions, such asgreater than, less than, or equal; or composite conditions, such asgreater than or equal, or less than or equal. The plurality ofconditions may also include other conditions, such as infinity,Not-a-Number (NAN), unordered conditions, etc.

As one particular embodiment, an instruction is provided to set aBoolean condition (e.g., represented in non-binary form) in a resultlocation, in which the result location may be a register specified bythe instruction to receive the set Boolean condition. The instructionincludes a mask that specifies a condition to be tested, in which thecondition may be a simple condition, a composite condition, or any othercondition. This allows a single instruction to test many conditions,including but not limited to, six integer conditions and fourteenfloating point conditions, as specified further below.

One embodiment of a computing environment to incorporate and use one ormore aspects is described with reference to FIG. 1. A computingenvironment 100 includes, for instance, a processor 102 (e.g., a centralprocessing unit), a memory 104 (e.g., main memory), and one or moreinput/output (I/O) devices and/or interfaces 106 coupled to one anothervia, for example, one or more buses 108 and/or other connections.

In one embodiment, processor 102 is based on the Power Architectureoffered by International Business Machines Corporation. One embodimentof the Power Architecture is described in “Power ISA™ Version 2.07B,”International Business Machines Corporation, Apr. 9, 2015, which ishereby incorporated herein by reference in its entirety. POWERARCHITECTURE® is a registered trademark of International BusinessMachines Corporation, Armonk, N.Y., USA. Other names used herein may beregistered trademarks, trademarks, or product names of InternationalBusiness Machines Corporation or other companies.

In another example, processor 102 is based on the z/Architecture offeredby International Business Machines Corporation, and is part of a server,such as the System z server, which implements the z/Architecture and isalso offered by International Business Machines Corporation. Oneembodiment of the z/Architecture is described in an IBM® publicationentitled, “z/Architecture Principles of Operation,” IBM® Publication No.SA22-7832-10, Eleventh Edition, March 2015, which is hereby incorporatedherein by reference in its entirety. In one example, the processorexecutes an operating system, such as z/OS, also offered byInternational Business Machines Corporation. IBM®, Z/ARCHITECTURE® andZ/OS® are registered trademarks of International Business MachinesCorporation.

In yet a further embodiment, processor 102 is based on an Intelarchitecture offered by Intel Corporation. Intel® is a registeredtrademark of Intel Corporation, Santa Clara, Calif. Yet further,processor 102 may be based on other architectures. The architecturesmentioned herein are merely provided as examples.

Another embodiment of a computing environment to incorporate and use oneor more aspects is described with reference to FIG. 2A. In this example,a computing environment 200 includes, for instance, a native centralprocessing unit 202, a memory 204, and one or more input/output devicesand/or interfaces 206 coupled to one another via, for example, one ormore buses 208 and/or other connections. As examples, computingenvironment 200 may include a PowerPC processor, a zSeries server, or apSeries server offered by International Business Machines Corporation,Armonk, N.Y.; an HP Superdome with Intel Itanium II processors offeredby Hewlett Packard Co., Palo Alto, Calif.; and/or other machines basedon architectures offered by International Business Machines Corporation,Hewlett Packard, Intel, Oracle, or others.

Native central processing unit 202 includes one or more native registers210, such as one or more general purpose registers and/or one or morespecial purpose registers used during processing within the environment.These registers include information that represent the state of theenvironment at any particular point in time.

Moreover, native central processing unit 202 executes instructions andcode that are stored in memory 204. In one particular example, thecentral processing unit executes emulator code 212 stored in memory 204.This code enables the processing environment configured in onearchitecture to emulate another architecture. For instance, emulatorcode 212 allows machines based on architectures other than the Powerarchitecture, such as zSeries servers, pSeries servers, HP Superdomeservers or others, to emulate the Power architecture and to executesoftware and instructions developed based on the Power architecture. Ina further example, emulator code 212 allows machines based onarchitectures other than the z/Architecture, such as PowerPC processors,pSeries servers, HP Superdome servers or others, to emulate thez/Architecture and to execute software and instructions developed basedon the z/Architecture. Other architectures may also be emulated.

Further details relating to emulator code 212 are described withreference to FIG. 2B. Guest instructions 250 stored in memory 204comprise software instructions (e.g., correlating to machineinstructions) that were developed to be executed in an architectureother than that of native CPU 202. For example, guest instructions 250may have been designed to execute on a PowerPC processor or az/Architecture processor 102, but instead, are being emulated on nativeCPU 202, which may be, for example, an Intel Itanium II processor. Inone example, emulator code 212 includes an instruction fetching routine252 to obtain one or more guest instructions 250 from memory 204, and tooptionally provide local buffering for the instructions obtained. Italso includes an instruction translation routine 254 to determine thetype of guest instruction that has been obtained and to translate theguest instruction into one or more corresponding native instructions256. This translation includes, for instance, identifying the functionto be performed by the guest instruction and choosing the nativeinstruction(s) to perform that function.

Further, emulator code 212 includes an emulation control routine 260 tocause the native instructions to be executed. Emulation control routine260 may cause native CPU 202 to execute a routine of native instructionsthat emulate one or more previously obtained guest instructions and, atthe conclusion of such execution, return control to the instructionfetch routine to emulate the obtaining of the next guest instruction ora group of guest instructions. Execution of the native instructions 256may include loading data into a register from memory 204; storing databack to memory from a register; or performing some type of arithmetic orlogic operation, as determined by the translation routine.

Each routine is, for instance, implemented in software, which is storedin memory and executed by native central processing unit 202. In otherexamples, one or more of the routines or operations are implemented infirmware, hardware, software or some combination thereof. The registersof the emulated processor may be emulated using registers 210 of thenative CPU or by using locations in memory 204. In embodiments, guestinstructions 250, native instructions 256 and emulator code 212 mayreside in the same memory or may be disbursed among different memorydevices.

As used herein, firmware includes, e.g., the microcode, millicode and/ormacrocode of the processor. It includes, for instance, thehardware-level instructions and/or data structures used inimplementation of higher level machine code. In one embodiment, itincludes, for instance, proprietary code that is typically delivered asmicrocode that includes trusted software or microcode specific to theunderlying hardware and controls operating system access to the systemhardware.

In one example, a guest instruction 250 that is obtained, translated andexecuted is an instruction described herein. The instruction, which isof one architecture (e.g., the Power architecture or z/Architecture) isfetched from memory, translated and represented as a sequence of nativeinstructions 256 of another architecture (e.g., the z/Architecture,Power architecture, Intel architecture, etc.). These native instructionsare then executed.

One instruction used in accordance with one or more aspects is a compareinstruction used to compare data in two registers. One implementation ofa compare instruction is described with reference to FIG. 3A. In oneexample, a Compare (CMP) instruction 300 includes operation code(opcode) fields 302 a (e.g., bits 0-5), 302 b (e.g., bits 21-30)indicating a compare operation; a first field (BF) 304 (e.g., bits 6-8)used to indicate a field in a condition register; a second field (L) 306(e.g., bit 10) used to indicate whether operands are treated as 32-bitoperands (L=0) or 64-bit operands (L=1); a third field (RA) 308 (e.g.,bits 11-15) used to designate a first register to be compared; and afourth field (RB) 310 (e.g., bits 16-20) used to designate a secondregister to be compared with the first register. Each of the fields304-310, in one example, is separate and independent from one another;however, in other embodiments, more than one field may be combined.Further information on the use of the fields is provided below.

In operation, the contents of register RA (bits 32:63, if L=0, and bits0:63, if L=1) are compared with the contents of register RB (bits 32:63,if L=0, and bits 0:63, if L=1), treating the operands as signedintegers. The result of the comparison is placed into a conditionregister in a field designated by BF. As examples, if the contents ofregister RA are less than the contents of register RB, the result is1000(b-binary); if greater than, the result is 0100(b); and if equal,the result is 0010(b). This result is placed in the condition registerin the selected field designated by BF.

In particular, as depicted in FIG. 3B, a condition register 350 includesa plurality of fields 352, and each field includes a condition code 354.The condition code is, for instance, four bits, and each bit representsa particular predicate or condition, such as the leftmost bit representsless than, next leftmost bit represents greater than, the next leftmostbit represents equal, and the rightmost bit represents anothercondition, such as an unordered flag for floating point, etc. The BFfield indicates which field in the condition register is to receive theresult of the comparison (i.e., which condition code is to be set).

Thus, in one embodiment, the compare instruction compares the contentsof the two registers, and places a result of the comparison in aselected field (or condition code) within the condition register. Theselected field has a plurality of bits, and each bit represents aparticular condition. The setting of a particular bit represents theassociated condition. After setting the selected field using, forinstance, a compare instruction or another instruction, the selectedfield of the condition register may be tested and a Boolean conditionmay be set, as described herein.

Although in various examples herein, the selected field is one of aplurality of fields in a condition register selected by a field of aninstruction, in other embodiments, there is only one field to beselected (such as in a program status word or a flag), and therefore,there is no BF field. The result is just placed in the one fielddesignated to receive the results of the comparison.

One example of an instruction to test a selected field and set a Booleancondition is described with reference to FIG. 4A. In one exampleimplementation in the Power Architecture, a Set Boolean (Setb)instruction 400 includes, for instance, opcode fields 402 a (e.g., bits0-5), 402 b (e.g., bits 21-31) indicating a set Boolean operation; aresult field 404 (e.g., bits 6-10) used to designate a general purposeregister (GPR) to hold the result (RT) of the set Boolean operation; aselection field (BFA) 406 (e.g., bits 12-15) used to identify a fieldwithin a condition register; and a mask field 408 (e.g., bits 16-20)used to designate a condition code mask (CCmask). Each of the fields404-408, in one example, is separate and independent from one another;however, in other embodiments, more than one field may be combined.Further information on the use of the fields is provided below.

In operation, if the contents of the condition register field identifiedby BFA ANDed with the condition code mask are not equal to zero, thecontents of the register RT are set to 0x0000_0000_0000_0001 (i.e.,integer 1). Otherwise, the contents of register RT are set to0x0000_0000_0000_0000 (i.e., integer 0).

One embodiment of pseudo-code for the Set Boolean operation includes:

If (CR.bit[4xBFA+32) & CCmask) !=0 then

GPR[RT]=0x0000_0000_0000_0001

Else

GPR[RT]=0x0000_0000_0000_0000

Where != is not equal. Also, in the above pseudo-code, in checking thebits, 32 is added since in this embodiment, the condition register bitsstart at position 32; however, this is not necessary, and thus, if theybegin at 0, no value may be added, or a different value may be added ifthey start at a different position. Many possibilities exist.

One embodiment of logic associated with the Set Boolean instruction isdescribed with reference to FIG. 4B. Initially, contents of a selectedfield (e.g., a selected condition register field) are obtained, STEP450. In one example, contents of BFA are used to index into a conditionregister to obtain the contents of a specific condition code field(i.e., selected field). In another embodiment, however, there is onlyone selected field, so there is no need to use BFA to select theselected field.

Further, a mask (e.g., CCmask) is obtained from the instruction, STEP452. The mask indicates the condition to be tested. For instance, it mayindicate the testing of a simple condition, such as less than, greaterthan, or equal; a composite condition, such as greater than or equal, orless than or equal; or another type of condition, such as an unorderedfloating point. Other examples are also possible.

A logical operation (e.g., AND) is performed on the contents obtainedfrom the selected field and the mask to obtain an output, STEP 454. Forinstance, contents AND CCmask=output. The output includes a plurality ofbits, and, in one embodiment, the bits of the output are “ORed” in orderto provide a value, e.g., a single bit value represented in binary, STEP456. If the value does not equal a specified value (e.g., 0), INQUIRY458, then a selected value, e.g., 1 (represented in a non-binary datatype, such as integer), is placed into a result location, e.g., thetarget register, RT, STEP 460; otherwise, another selected value, e.g.,0 (represented in a non-binary data type, such as integer), is placedinto the result location, e.g., the target register, STEP 462.

In other embodiments, other non-binary data types may be used for theresult including, but not limited to floating point, decimal floatingpoint, binary coded decimal, string, etc.).

In one embodiment, the Set Boolean instruction is able to cover all 6valid combinations of less than (LT), greater than (GT), and equal (EQ)for integer operations; and all 14 valid combinations of less than (FL),greater than (FG), equal (FE), and unordered (FU) for floating pointoperations, using just the one instruction. The instruction sets thetarget register to either 0x0000_0000_0000_0000 or 0x0000_0000_0000_0001based on whether the combination evaluates as false or true.

Examples of the 6 integer operations include, for instance:

setb RT,BFA,0b1000 ; LT (!GE) setb RT,BFA,0b1100 ; LT|GT ( NE) setbRT,BFA,0b1010 ; LT|EQ (!GT) setb RT,BFA,0b0100 ; GT (!LE) setbRT,BFA,0b0110 ; GT|EQ (!LT) setb RT,BFA,0b0010 ; EQ (!LT & !GT)

Examples of the 14 integer operations include, for instance:

setb RT,BFA,0b1000 ; FL ( LT) setb RT,BFA,0b1100 ; FL|FG (LT | GT) setbRT,BFA,0b1110 ; FL|FG|FE (!NAN) setb RT,BFA,0b1101 ; FL|FG|FU ( NE) setbRT,BFA,0b1010 ; FL|FE ( LE) setb RT,BFA,0b1011 ; FL|FE|FU (!GT) setbRT,BFA,0b1001 ; FL|FU (!GE) setb RT,BFA,0b0100 ; FG ( GT) setbRT,BFA,0b0110 ; FG|FE ( GE) setb RT,BFA,0b0111 ; FG|FE|FU (!LT) setbRT,BFA,0b0101 ; FG|FU (!LE) setb RT,BFA,0b0010 ; FE ( EQ) setbRT,BFA,0b0011 ; FE|FU (!LT & !GT) setb RT,BFA,0b0001 ; FU (NAN)

Again, other operations and/or conditions may be represented.

As described herein, in one embodiment and with reference to FIG. 5, amachine instruction (e.g., Setb) is obtained, and the machineinstruction has associated therewith a result location to be used for aset Boolean operation and a mask, STEP 500. The mask is configured totest a plurality of conditions, including, but not limited to, simpleconditions, composite conditions, and optionally other types ofconditions, including, for example, unordered conditions, as well asothers, STEP 502. Further, the machine instruction optionally hasassociated therewith (e.g., includes) a selection field to select afield to be tested, STEP 504. The selected field may be a field of acondition register selected by the selection field, or a field in aprogram status word (PSW) or a field of a flag, as examples.

The machine instruction is executed, STEP 510. The executing includes,for instance, performing a first logical operation (e.g., an ANDoperation) between the mask, which indicates a condition to be tested,and contents of a selected field to obtain an output, STEP 512. A secondlogical operation (e.g., OR) is performed on the output (e.g., on thebits of the output) to obtain a value of one data type (e.g., a binaryvalue), STEP 514. The value is then used in obtaining the result, STEP516, which is placed in the result location. For instance, if the valueis equal to zero, a result of zero in a data type different from the onedata type (e.g., integer, floating point, decimal floating point, binarycoded decimal) is placed in the result location (e.g., the registerspecified in the result field), and if the value is equal to one, aresult of one in the different data type is placed in the resultlocation (e.g., the register specified in the result field).

As examples, the result location may be a register specified by a resultfield of an instruction; an implied register of an instruction; a memorylocation; a field of an instruction, etc. Many examples exist.

A capability is provided for producing a Boolean value by interpretingthe state of one or more status flags in a condition status register setby a previous instruction, such as a compare instruction or anotherinstruction that provides similar types of results. A single Set Booleaninstruction covers all six combinations for integer and all fourteencombinations for floating point (e.g., not FL is not the same as FG orFE, also factors in unordered, or !FL=FG|FE|FU). Although an example ofthe instruction is provided for the Power Architecture, one or moreaspects are equally applicable to other architectures, including but notlimited to, the z/Architecture and an Intel architecture. However, inother architectures, the selected field may be designated in other ways.For instance, in the z/Architecture, the PSW specifies the selectedfield, and in the Intel architecture a flags field is used. Since thereis only one condition code or selected field, there is no BFA field.Other variations are also possible.

In one or more aspects, the Setb instruction only requires a single bitin the condition code (CC) and the respective bit in the mask to be setto 1 in order for the overall condition to evaluate TRUE, independent ofthe rest of the CC and mask. For example, the condition “less than” canbe specified with the value mask=1000, the condition “equal to” can bespecified with the value mask=0010, and the composite condition “lessthan OR equal to” can be specified with the value mask=1010. For thecomposite condition, if CC reflects “less than”, the condition evaluatesas TRUE, or if CC reflects “equal to”, the condition also evaluates asTRUE. Setb provides the ability to specify a composite condition, unlikeother instructions.

One or more aspects enable the extraction of Boolean state such thatcomplex logical conditions can be generated without branch code, withoutthe use of an inordinate number of (e.g., more than two) instructionsand registers, and without introducing dependencies between multipleinstructions. This allows less expensive and easier code to execute. Italso is beneficial for those Instruction Set Architectures (ISAs) thatdo not support greater than two operands.

One or more aspects may relate to cloud computing.

It is understood in advance that although this disclosure includes adetailed description on cloud computing, implementation of the teachingsrecited herein are not limited to a cloud computing environment. Rather,embodiments of the present invention are capable of being implemented inconjunction with any other type of computing environment now known orlater developed.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g. networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based email). Theconsumer does not manage or control the underlying cloud infrastructureincluding network, servers, operating systems, storage, or evenindividual application capabilities, with the possible exception oflimited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forloadbalancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

Referring now to FIG. 6, a schematic of an example of a cloud computingnode is shown. Cloud computing node 6010 is only one example of asuitable cloud computing node and is not intended to suggest anylimitation as to the scope of use or functionality of embodiments of theinvention described herein. Regardless, cloud computing node 6010 iscapable of being implemented and/or performing any of the functionalityset forth hereinabove.

In cloud computing node 6010 there is a computer system/server 6012,which is operational with numerous other general purpose or specialpurpose computing system environments or configurations. Examples ofwell-known computing systems, environments, and/or configurations thatmay be suitable for use with computer system/server 6012 include, butare not limited to, personal computer systems, server computer systems,thin clients, thick clients, handheld or laptop devices, multiprocessorsystems, microprocessor-based systems, set top boxes, programmableconsumer electronics, network PCs, minicomputer systems, mainframecomputer systems, and distributed cloud computing environments thatinclude any of the above systems or devices, and the like.

Computer system/server 6012 may be described in the general context ofcomputer system executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 6012 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 6, computer system/server 6012 in cloud computing node6010 is shown in the form of a general-purpose computing device. Thecomponents of computer system/server 6012 may include, but are notlimited to, one or more processors or processing units 6016, a systemmemory 6028, and a bus 6018 that couples various system componentsincluding system memory 6028 to processor 6016.

Bus 6018 represents one or more of any of several types of busstructures, including a memory bus or memory controller, a peripheralbus, an accelerated graphics port, and a processor or local bus usingany of a variety of bus architectures. By way of example, and notlimitation, such architectures include Industry Standard Architecture(ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA)bus, Video Electronics Standards Association (VESA) local bus, andPeripheral Component Interconnect (PCI) bus.

Computer system/server 6012 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 6012, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 6028 can include computer system readable media in theform of volatile memory, such as random access memory (RAM) 6030 and/orcache memory 6032. Computer system/server 6012 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 6034 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 6018 by one or more datamedia interfaces. As will be further depicted and described below,memory 6028 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 6040, having a set (at least one) of program modules6042, may be stored in memory 6028 by way of example, and notlimitation, as well as an operating system, one or more applicationprograms, other program modules, and program data. Each of the operatingsystem, one or more application programs, other program modules, andprogram data or some combination thereof, may include an implementationof a networking environment. Program modules 6042 generally carry outthe functions and/or methodologies of embodiments of the invention asdescribed herein.

Computer system/server 6012 may also communicate with one or moreexternal devices 6014 such as a keyboard, a pointing device, a display6024, etc.; one or more devices that enable a user to interact withcomputer system/server 6012; and/or any devices (e.g., network card,modem, etc.) that enable computer system/server 6012 to communicate withone or more other computing devices. Such communication can occur viaInput/Output (I/O) interfaces 6022. Still yet, computer system/server6012 can communicate with one or more networks such as a local areanetwork (LAN), a general wide area network (WAN), and/or a publicnetwork (e.g., the Internet) via network adapter 6020. As depicted,network adapter 6020 communicates with the other components of computersystem/server 6012 via bus 6018. It should be understood that althoughnot shown, other hardware and/or software components could be used inconjunction with computer system/server 6012. Examples, include, but arenot limited to: microcode, device drivers, redundant processing units,external disk drive arrays, RAID systems, tape drives, and data archivalstorage systems, etc.

Referring now to FIG. 7, illustrative cloud computing environment 6050is depicted. As shown, cloud computing environment 6050 comprises one ormore cloud computing nodes 6010 with which local computing devices usedby cloud consumers, such as, for example, personal digital assistant(PDA) or cellular telephone 6054A, desktop computer 6054B, laptopcomputer 6054C, and/or automobile computer system 6054N may communicate.Nodes 6010 may communicate with one another. They may be grouped (notshown) physically or virtually, in one or more networks, such asPrivate, Community, Public, or Hybrid clouds as described hereinabove,or a combination thereof. This allows cloud computing environment 6050to offer infrastructure, platforms and/or software as services for whicha cloud consumer does not need to maintain resources on a localcomputing device. It is understood that the types of computing devices6054A-N shown in FIG. 7 are intended to be illustrative only and thatcomputing nodes 6010 and cloud computing environment 6050 cancommunicate with any type of computerized device over any type ofnetwork and/or network addressable connection (e.g., using a webbrowser).

Referring now to FIG. 8, a set of functional abstraction layers providedby cloud computing environment 6050 (FIG. 7) is shown. It should beunderstood in advance that the components, layers, and functions shownin FIG. 8 are intended to be illustrative only and embodiments of theinvention are not limited thereto. As depicted, the following layers andcorresponding functions are provided:

Hardware and software layer 6060 includes hardware and softwarecomponents. Examples of hardware components include mainframes 6061;RISC (Reduced Instruction Set Computer) architecture based servers 6062;servers 6063; blade servers 6064; storage devices 6065; networks andnetworking components 6066. In some embodiments, software componentsinclude network application server software 6067 and database software6068.

Virtualization layer 6070 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers6071; virtual storage 6072; virtual networks 6073, including virtualprivate networks; virtual applications and operating systems 6074; andvirtual clients 6075.

In one example, management layer 6080 may provide the functionsdescribed below. Resource provisioning 6081 provides dynamic procurementof computing resources and other resources that are utilized to performtasks within the cloud computing environment. Metering and Pricing 6082provide cost tracking as resources are utilized within the cloudcomputing environment, and billing or invoicing for consumption of theseresources. In one example, these resources may comprise applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal 6083 provides access to the cloud computing environment forconsumers and system administrators. Service level management 6084provides cloud computing resource allocation and management such thatrequired service levels are met. Service Level Agreement (SLA) planningand fulfillment 6085 provide pre-arrangement for, and procurement of,cloud computing resources for which a future requirement is anticipatedin accordance with an SLA.

Workloads layer 6090 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation 6091; software development and lifecycle management 6092;virtual classroom education delivery 6093; data analytics processing6094; transaction processing 6095; and conversion processing of one ormore aspects of the present invention 6096.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

In addition to the above, one or more aspects may be provided, offered,deployed, managed, serviced, etc. by a service provider who offersmanagement of customer environments. For instance, the service providercan create, maintain, support, etc. computer code and/or a computerinfrastructure that performs one or more aspects for one or morecustomers. In return, the service provider may receive payment from thecustomer under a subscription and/or fee agreement, as examples.Additionally or alternatively, the service provider may receive paymentfrom the sale of advertising content to one or more third parties.

In one aspect, an application may be deployed for performing one or moreembodiments. As one example, the deploying of an application comprisesproviding computer infrastructure operable to perform one or moreembodiments.

As a further aspect, a computing infrastructure may be deployedcomprising integrating computer readable code into a computing system,in which the code in combination with the computing system is capable ofperforming one or more embodiments.

As yet a further aspect, a process for integrating computinginfrastructure comprising integrating computer readable code into acomputer system may be provided. The computer system comprises acomputer readable medium, in which the computer medium comprises one ormore embodiments. The code in combination with the computer system iscapable of performing one or more embodiments.

Although various embodiments are described above, these are onlyexamples. For example, computing environments of other architectures canbe used to incorporate and use one or more embodiments. Further,different instructions, instruction formats, instruction fields and/orinstruction values may be used. Many variations are possible.

Further, other types of computing environments can benefit and be used.As an example, a data processing system suitable for storing and/orexecuting program code is usable that includes at least two processorscoupled directly or indirectly to memory elements through a system bus.The memory elements include, for instance, local memory employed duringactual execution of the program code, bulk storage, and cache memorywhich provide temporary storage of at least some program code in orderto reduce the number of times code must be retrieved from bulk storageduring execution.

Input/Output or I/O devices (including, but not limited to, keyboards,displays, pointing devices, DASD, tape, CDs, DVDs, thumb drives andother memory media, etc.) can be coupled to the system either directlyor through intervening I/O controllers. Network adapters may also becoupled to the system to enable the data processing system to becomecoupled to other data processing systems or remote printers or storagedevices through intervening private or public networks. Modems, cablemodems, and Ethernet cards are just a few of the available types ofnetwork adapters.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting. As used herein, thesingular forms “a”, “an” and “the” are intended to include the pluralforms as well, unless the context clearly indicates otherwise. It willbe further understood that the terms “comprises” and/or “comprising”,when used in this specification, specify the presence of statedfeatures, integers, steps, operations, elements, and/or components, butdo not preclude the presence or addition of one or more other features,integers, steps, operations, elements, components and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below, if any, areintended to include any structure, material, or act for performing thefunction in combination with other claimed elements as specificallyclaimed. The description of one or more embodiments has been presentedfor purposes of illustration and description, but is not intended to beexhaustive or limited to in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the art. Theembodiment was chosen and described in order to best explain variousaspects and the practical application, and to enable others of ordinaryskill in the art to understand various embodiments with variousmodifications as are suited to the particular use contemplated.

1. A computer program product for executing a machine instruction in acomputing environment, the computer program product including a storagemedium readable by a processing circuit and storing instructions forexecution by the processing circuit for performing a method, the methodcomprising: obtaining, by a processor, a machine instruction to performa set Boolean operation, the machine instruction having associatedtherewith a result location to be used for the set Boolean operation anda mask configured to test a plurality of types of conditions includingsimple conditions and composite conditions; and executing, by theprocessor, the machine instruction, the executing comprising: performinga first logical operation between the mask and contents of a selectedfield to obtain an output, the mask indicating a condition to be tested,the condition being one type of condition of the plurality of types ofconditions; performing a second logical operation on the output toobtain a first value, the first value represented as one data type; andplacing a result in the result location based on the first value, theresult comprising a second value of another data type, the other datatype being different from the one data type.
 2. The computer programproduct of claim 1, wherein the condition comprises a compositecondition, the composite condition comprising one of less than or equal,or greater than or equal.
 3. The computer program product of claim 1,wherein the first logical operation comprises AND, and the secondlogical operation comprises OR.
 4. The computer program product of claim3, wherein the output comprises a plurality of bits, and wherein theperforming the second logical operation comprises performing an ORoperation on the plurality of bits to obtain the first value.
 5. Thecomputer program product of claim 1, wherein the selected field is afield within a condition register, the condition register comprising aplurality of fields to include a plurality of condition codes, theselected field including a condition code of the plurality of conditioncodes, and wherein the machine instruction comprises a selection fieldto include a selection indicator, the selection indicator to select theselected field.
 6. The computer program product of claim 1, wherein themethod further comprises setting the result to zero in a non-binary datatype based on the first value comprising zero in a binary data type, andsetting the result to one in the non-binary data type based on the firstvalue comprising one in the binary data type.
 7. The computer programproduct of claim 1, wherein the mask is configured to test a pluralityof conditions, the plurality of conditions being of the plurality oftypes of conditions, the plurality of conditions comprising one or moreconditions for integer processing and one or more conditions forfloating point processing.
 8. The computer program product of claim 1,wherein the plurality of types of conditions further comprises unorderedconditions.
 9. The computer program product of claim 1, wherein theselected field is a field of one of a program status word, a conditionregister or a flags field.
 10. A computer system for executing a machineinstruction in a computing environment, said computer system comprising:a memory; and a processor in communications with the memory, wherein thecomputer system is configured to perform a method, the methodcomprising: obtaining, by the processor, a machine instruction toperform a set Boolean operation, the machine instruction havingassociated therewith a result location to be used for the set Booleanoperation and a mask configured to test a plurality of types ofconditions including simple conditions and composite conditions; andexecuting, by the processor, the machine instruction, the executingcomprising: performing a first logical operation between the mask andcontents of a selected field to obtain an output, the mask indicating acondition to be tested, the condition being one type of condition of theplurality of types of conditions; performing a second logical operationon the output to obtain a first value, the first value represented asone data type; and placing a result in the result location based on thefirst value, the result comprising a second value of another data type,the other data type being different from the one data type.
 11. Thecomputer system of claim 10, wherein the condition comprises a compositecondition, the composite condition comprising one of less than or equal,or greater than or equal.
 12. The computer system of claim 10, whereinthe first logical operation comprises AND, and the second logicaloperation comprises OR.
 13. The computer system of claim 10, wherein theselected field is a field within a condition register, the conditionregister comprising a plurality of fields to include a plurality ofcondition codes, the selected field including a condition code of theplurality of condition codes, and wherein the machine instructioncomprises a selection field to include a selection indicator, theselection indicator to select the selected field.
 14. The computersystem of claim 10, wherein the method further comprises setting theresult to zero in a non-binary data type based on the first valuecomprising zero in a binary data type, and setting the result to one inthe non-binary data type based on the first value comprising one in thebinary data type.
 15. The computer system of claim 10, wherein the maskis configured to test a plurality of conditions, the plurality ofconditions being of the plurality of types of conditions, the pluralityof conditions comprising one or more conditions for integer processingand one or more conditions for floating point processing. 16-20.(canceled)